package operands;

import instructions.Instruction;

public class IndirectAFieldWithDecOperand extends Operand
{

	public IndirectAFieldWithDecOperand(int value) 
	{
		super(value);
	}
	
	@Override
	public int resolve()
	{
		return memory.getInstruction(instruction.getAddres() + value).getOperandA().resolve();
	}
	
	@Override
	public void pre()
	{
		memory.getInstruction(instruction.getAddres() + value).getOperandA().value--;
	}

	@Override
	public Operand copy() 
	{
		return new IndirectAFieldWithDecOperand(value);
	}

	@Override
	public Instruction resolveInstruction() {
		// TODO Auto-generated method stub
		return null;
	}
}
